<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .container{
          display: flex;
          justify-content: center;
        }
        .menu{
           display: flex;

        }
       .menu a{
            margin: 10px;
            padding: 10px;
            text-decoration: none;
            color: black;
            background-color: #f0f0f0;
        }  
    </style>
</head>
<body>
    <div class="container">
        <nav class="menu">
            <a href="#">首页</a>
            <a href="#">关于</a>
            <a href="#">服务</a>
            <a href="#">联系</a>
        </nav>
    </div>
</body>
</html>